﻿namespace Sex
{
    public partial class Sex : System.Web.UI.Page
    {
        public enum E_ObjectType { DIRECTORY, FILE };
        public class ItemInfo
        {
            public E_ObjectType type;
            public long size;
            public string name;
            public ItemInfo(E_ObjectType type, long size, string name)
            {
                this.type = type;
                this.size = size;
                this.name = name;
            }
            public ItemInfo(string serial)
            {
                string[] components = serial.Split(new char[] { ValueDelimiter[0] });
                this.type = components[0] == "d" ? E_ObjectType.DIRECTORY : E_ObjectType.FILE;
                this.size = long.Parse(components[1]);
                this.name = components[2];
            }
        }
    }
}